-- GENERATED SPELL FOR [Terrormaster] --


function spell0_21314(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(15496,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21314', 682, 1)
end

function spell1_21314(pUnit, Event) --@Fear,n/a--
pUnit:FullCastSpellOnTarget(38154,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21314', 7500, 1)
end

function Sorts_21314(pUnit, Event)
local choix_sorts_21314 = math.random(0, 1)
if choix_sorts_21314 == 0 then
pUnit:RegisterEvent('spell0_21314', 1, 1)
end
if choix_sorts_21314 == 1 then
pUnit:RegisterEvent('spell1_21314', 1, 1)
end
end

function mob21314_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_21314', math.random(1500, 3000), 1)
end

function mob21314_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21314_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21314_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(21314, 1, 'mob21314_Action')
RegisterUnitEvent(21314, 2, 'mob21314_Leave')
RegisterUnitEvent(21314, 3, 'mob21314_Kill')
RegisterUnitEvent(21314, 4, 'mob21314_Die')
